<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        // var str = 'hello world'
        // console.log(str.length)
        // console.log(str.charAt(2))
        // console.log(str.charCodeAt(10))
        // console.log(String.fromCharCode(100))

        // function fn(num1, num2) {
        //     var arr = []
        //     for (i = num1; i <= num2; i++) {
        //         arr.push(String.fromCharCode(i))
        //     }
        //     return arr
        // }
        // console.log(fn(97, 122))
        // console.log(fn(65, 90))
        // console.log(fn(48, 57))

        // var newArr = fn(48, 57).concat(fn(97, 122), fn(65, 90))
        // console.log(newArr)
        var str = 'FASDADA1651ads'
        function s(str) {
            var temp = ''
            for (i = 0; i < str.length; i++) {
                var code = str.charCodeAt(i)
                if (code >= 65 && code <= 90) {
                    code += 32
                }
                temp += String.fromCharCode(code)
            }
            
            return temp
        }
        console.log(s(str))

    </script>
</body>

</html>